package com.carrental.api.workbench.controller;

import com.carrental.api.workbench.domain.WorkCount;
import com.carrental.api.workbench.service.WorkBenchService;
import com.carrental.common.response.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiangYi
 * @since 2022/3/27 17:50
 */
@Api(tags = "首页控制台")
@RestController
@RequestMapping("/work")
public class WorkBenchController {
    @Autowired
    private WorkBenchService workBenchService;
    /**
     * 统计所有车辆数
     */
    @GetMapping("/count")
    @ApiOperation("模块数")
    public CommonResult<WorkCount> carCount(){
        return CommonResult.success(workBenchService.getServeCount());
    }


}
